(self.AMP=self.AMP||[]).push({n:"amp-accordion",v:"2102130314001",m:0,f:(function(AMP,_){ 'use strict';var aa="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b};function ca(a){for(var b=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global],c=0;c=b)return 0;if(1<=b)return 1;for(var c=0,e=1,d=0,f=0;8>f;f++){d=this.getPointX(b);var g=(this.getPointX(b+1E-6)-d)/1E-6;if(1E-6>Math.abs(d-a))return b;if(1E-6>Math.abs(g))break;else df;f++)dc;c++)if(isNaN(b[c]))return null;return E(b[0],b[1],b[2],b[3])}return null}return oa[a]}return a};function pa(){}function H(a){this.o=a;this.C=z(self,"vsync");this.H=null;this.h=[]}function qa(a,b,c){var e=ra;return(new H(a)).setCurve(e).add(0,b,1).start(c)}H.prototype.setCurve=function(a){a&&(this.H=G(a));return this};H.prototype.add=function(a,b,c,e){this.h.push({delay:a,func:b,duration:c,curve:G(e)});return this};H.prototype.start=function(a){return new I(this.C,this.o,this.h,this.H,a)}; function I(a,b,c,e,d){this.C=a;this.o=b;this.h=[];for(b=0;b=e.delay&&(e.started=!0)}for(c=0;c=e&&(b[c]=Math.random() tag, See https://github.com/ampproject/amphtml/blob/master/extensions/amp-accordion/amp-accordion.md. Found in: %s",a.element);var e=b.children;y(2==e.length,"Each section must have exactly two children. See https://github.com/ampproject/amphtml/blob/master/extensions/amp-accordion/amp-accordion.md. Found in: %s", a.element);var d=e["0"],f=e["1"];f.classList.add("i-amphtml-accordion-content");var g=f.getAttribute("id");g||(g=a.I+"_AMP_content_"+c,f.setAttribute("id",g));var h=d.getAttribute("id");h||(h=a.I+"_AMP_header_"+c,d.setAttribute("id",h));a.registerAction("toggle",function(k){return X(a,k)});a.registerAction("expand",function(k){return X(a,k)});a.registerAction("collapse",function(k){return X(a,k)});a.j.addToAllowlist("amp-accordion",["toggle","expand","collapse"],["email"]);(new a.win.MutationObserver(function(k){wa(a, k)})).observe(b,{attributes:!0,attributeFilter:["data-expand"]});a.A[g]?b.setAttribute("expanded",""):!1===a.A[g]&&b.removeAttribute("expanded");a.mutateElement(function(){});var l=b.hasAttribute("expanded");d.classList.add("i-amphtml-accordion-header");d.setAttribute("role","button");d.setAttribute("aria-controls",g);d.setAttribute("aria-expanded",String(l));d.hasAttribute("tabindex")||d.setAttribute("tabindex",0);a.B.push(d);f.setAttribute("aria-labelledby",h);f.setAttribute("role","region");y(0== a.j.hasAction(d,"tap",b),"amp-accordion headings should not have tap actions registered.");d.addEventListener("click",a.M.bind(a));d.addEventListener("keydown",a.O.bind(a));ta(a.win)&&(a.element.classList.add("i-amphtml-display-locking"),f.addEventListener("beforematch",function(){Y(a,b,3,!0)}))})}; function X(a,b){var c=b.method,e=b.args,d=b.trust,f=void 0;"expand"===c?f=!0:"collapse"===c&&(f=!1);if(e){var g=e.section,h=a.getAmpDoc().getElementById(g);h=w().assertElement(h);y(h,"No element found with id: %s",g);Y(a,h,d,f)}else for(c=0;ca&&(a+=this.B.length);try{this.B[a].focus()}catch(c){}}break;case "Enter":case " ":a.target==a.currentTarget&&(a.preventDefault(),Y(this,a.currentTarget.parentElement,3))}}; function wa(a,b){b.forEach(function(c){var e=c.target,d=e.hasAttribute("data-expand");e.hasAttribute("expanded")!==d&&Y(a,e,2,d)})}T.prototype.U=function(){return this.j};(function(a){a.registerElement("amp-accordion",T,"amp-accordion>section>:last-child{display:none!important}amp-accordion>section[expanded]>:last-child{display:block!important}.i-amphtml-accordion-content,.i-amphtml-accordion-header{margin:0}.i-amphtml-accordion-header{cursor:pointer;background-color:#efefef;padding-right:20px;border:1px solid #dfdfdf}amp-accordion.i-amphtml-display-locking>section:not([expanded])>:last-child,amp-accordion.i-amphtml-display-locking>section:not([expanded])>:last-child *{content-visibility:hidden-matchable!important;display:block!important}amp-accordion>section:not([expanded]) .i-amphtml-media-component,amp-accordion>section:not([expanded]) .i-amphtml-media-component *{display:none!important;visibility:hidden!important}\n/*# sourceURL=/extensions/amp-accordion/0.1/amp-accordion.css*/")})(self.AMP); })}); //# sourceMappingURL=amp-accordion-0.1.js.map